package com.ibeetl.admin.aod.entity;

import com.ibeetl.admin.core.entity.BaseEntity;
import com.ibeetl.admin.core.util.ValidateConfig;
import org.beetl.sql.core.annotatoin.AutoID;
import org.beetl.sql.core.annotatoin.SeqID;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/* 
* 
* gen by Spring Boot2 Admin 2018-04-02
*/
public class AodBlackList extends BaseEntity{

    //主键
    @NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
    @SeqID(name = ORACLE_CORE_SEQ_NAME)
    @AutoID	
    private Integer id ;
	
    //手机号码
    private String phoneNumber ;
	
    public AodBlackList()
    {
    }

    /**主键
    *@return 
    */
    public Integer getId(){
	    return  id;
    }
    /**主键
    *@param  id
    */
    public void setId(Integer id){
        this.id = id;
    }

    /**手机号码
    *@return 
    */
    public String getPhoneNumber(){
	    return  phoneNumber;
    }
    /**手机号码
    *@param  phoneNumber
    */
    public void setPhoneNumber(String phoneNumber){
        // 不知道会不会有性能影响 TODO
        if (phoneNumber.contains("E") || phoneNumber.contains(".")) {
            BigDecimal bigDecimal = new BigDecimal(phoneNumber);
            this.phoneNumber = bigDecimal.toPlainString();
        } else {
            this.phoneNumber = phoneNumber;
        }
    }


}
